<template>
  <div>
    <el-col :span="6">
      <el-form-item label="车辆产权:">
        <el-select filterable  v-model="queryParams.propertyRightId" clearable
                   style="width: 100%">
          <template v-for="(item, index) in companyOriginList">
            <el-option :label="item.deptName" :value="item.deptId" :key="index"></el-option>
          </template>
        </el-select>
      </el-form-item>
    </el-col>

    <el-col :span="6">
      <el-form-item label="车辆归属:">
        <el-select filterable v-model="queryParams.ascriptionId" clearable
                   style="width: 100%">
          <template v-for="(item, index) in belongCompanyList">
            <el-option :label="item.deptName" :value="item.deptId" :key="index"/>
          </template>
        </el-select>
      </el-form-item>
    </el-col>

    <el-col :span="6">
      <el-form-item label="车辆大区:">
        <RegionCityLink v-model="form.citydata" :key="carKey"
                        placeholder="请选择城市" ref="citySelect"
                        :showAllLevels="false" :defaultSelect="selIds"
                        @change="citySelectionChange"></RegionCityLink>
      </el-form-item>
    </el-col>
  </div>


</template>

<script>
import RegionCityLink from "@/views/components/provinceCity/regionCityLink.vue";
import {listDept} from "@/api/system/dept";

export default {
  name: 'ownership',
  components: {
    RegionCityLink
  },
  computed: {},
  watch: {},
  data() {
    return {
      form: {},
      companyOriginList: [],
      belongCompanyList: []
    };
  },
  created() {
    this.getCompanyOrigin()
  },
  mounted() {
  },
  methods: {
    getCompanyOrigin() {
      listDept({
        deptType: '2',//组织类型（1部门 2公司）
        regionId: null,//所在城市（省市区id）
      }).then(res => {
        this.companyOriginList = res.data
        this.belongCompanyList = res.data
      })
    },

   

    citySelectionChange(val){

    }
  },
};
</script>

<style scoped lang=""></style>


